<?php
if (!headers_sent()) session_start();
ob_start();
//
function file_exist($fname){
	if(!file_exists($fname)){
		echo "No exist file " . $fname;
		exit();
	}
}


file_exist('../lib/mysql.php');
require('../lib/mysql.php');
$db = new mysql();
// == class paging
file_exist('../lib/paging.php');
require('../lib/paging.php');
// == calss upload
file_exist('../lib/upload.php');
require('../lib/upload.php');
$upload = new upload();
//== class string
file_exist('../lib/string.php');
require('../lib/string.php');
$myString = new myString();

//--Connect--//
file_exist('../includes/info_db.php');
require('../includes/info_db.php');
$db->connect($db_host, $db_user, $db_pass, $db_name);
//-----//
$PathFile = "../upload/";
$PathThumbFile = "../upload/thumb/";
$PathIconFile = "../upload/icon/";
///////
mysql_query("SET NAMES 'UTF8'");
//
file_exist('../lib/function.php');
require('../lib/function.php');
// Ham he thong website
file_exist('../includes/function.php');
require('../includes/function.php');

///Include data
file_exist('../includes/data/data.php');
require('../includes/data/data.php');

//HAm URL 

function reHome($urlHome){
	header("Location: ".$urlHome."");
}

$SessionIdAdmin=$_SESSION["Acc"];


define('FCK_DIR','lib/fckeditor/');
require('lib/fckeditor/fckeditor.php');

if(isset($_GET["method"])) {$Method=$_GET["method"];}


$test = "<script>alert('testing');</script>";
$location = "<script>window.location='?';</script>";

//
$PathFile = "../upload/";
$PathThumbFile = "../upload/thumb/";
$imgWidth = 120;
$imgHeight = 120;
$PathFileDoc = "../upload/document/";
///
?>
